<template>
	<view class="mainpadding">
		<u-parse :content="dataAll.content"></u-parse>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				type:"",
				dataAll:{
					title:"",
					content:""
				}
			}
		},
		onLoad(options){
			this.type = options.id
			let text = ""
			if(this.type==1){
				text="用户协议"
			}else if(this.type==2){
				text="隐私政策"
			}else if(this.type==3){
				text="关于我们"
			}
			uni.setNavigationBarTitle({
			    title: text
			});
			this.init()
		},
		methods: {
			init() {
				httpRequest.request('/api/index/getPlatformxy', 'POST', {
					id:this.type
				}, false, false, true).then(res => {
					this.dataAll = res.data
				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			},
		}
	}
</script>

<style>

</style>
